<?php echo $this -> Html -> css('Base/index'); ?>
<?php echo $this->element('assets/datetimepicker'); ?>
<!-- BEGIN PAGE CONTENT-->
<!-- general form elements -->
<div class="box box-primary">
    <div class="box-header">
        <h3 class="box-title">Users Add</h3>
    </div><!-- /.box-header -->
    <!--error -->
    <?php
    	if(isset($errors)){
    		echo $this->element('errors', array('errors' => $errors)); 
		}
    ?>
    <!-- form start -->
    <form role="form" action="/admin/users/add" method="post">
        <div class="box-body">        
            <!-- Input -->
            <?php echo $this -> Form -> input('username', array(
                'div' => 'form-group',
                'label' => 'Username',
                'class' => 'form-control',
                'placeholder' => 'Username'               
            ));?>   
                  
            <!-- Input -->
            <?php echo $this -> Form -> input('password', array(
                'div' => 'form-group',
                'label' => 'Password',
                'class' => 'form-control',
                'placeholder' => 'Password', 
                 'type'=>'password'              
            ));?>         
            
            <!-- Input -->
            <?php echo $this -> Form -> input('email', array(
                'div' => 'form-group',
                'label' => 'Email',
                'class' => 'form-control',
                'placeholder' => 'EX: meganet@gmail.com',                
            ));?>         
            
            <!-- checkbox -->
             <?php echo $this->Form->input('role', array(
			    'type' => 'select',			 
			    'options' => array(
			            'admin' => 'admin',
			            'user' => 'user'
			    )
			));?> 
            
            <!-- Input -->
            <?php echo $this -> Form -> select('creusr', $creusrs, array(
				'div' => 'form-group',
				'label' => 'Create user',
				'class' => 'form-control'
			));?>      
			
            <!-- Datepicker -->
            <!--<div class="form-group">
                <label>Created:</label>
                <div class="input-group">
                    <div class="input-group-addon">
                        <i class="fa fa-calendar"></i>
                    </div>
                    <input name="created" class="form-control datetimepicker1" id="datetimepicker1" type="text">
                </div>
            </div> -->
            
            <!-- Datepicker -->
            <!--<div class="form-group">
                <label>Modified:</label>
                <div class="input-group">
                    <div class="input-group-addon">
                        <i class="fa fa-calendar"></i>
                    </div>
                    <input name="modified" class="form-control datetimepicker2" id="datetimepicker2" type="text">
                </div>
            </div>-->
            
            <!-- Datepicker -->
            <!--<div class="form-group">
                <label>Last Login:</label>
                <div class="input-group">
                    <div class="input-group-addon">
                        <i class="fa fa-calendar"></i>
                    </div>
                    <input name="lastlogin" class="form-control datetimepicker3" id="datetimepicker3" type="text">
                </div>
            </div>  -->          

        </div><!-- /.box-body -->

        <div class="box-footer">
            <button type="submit" class="btn btn-primary">Submit</button>
        </div>
    </form>
</div><!-- /.box -->
<!-- END PAGE CONTENT-->

<!-- page script -->
<script type="text/javascript">
	$(function() {		

        $('.datetimepicker1').datetimepicker({setCurrDt : true});
        $('.datetimepicker2').datetimepicker({setCurrDt : true});
        $('.datetimepicker3').datetimepicker({setCurrDt : true});
	});
</script>